package com.ruoyi.memberSer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.memberSer.mapper.MemberSerMapper;
import com.ruoyi.memberSer.domain.MemberSer;
import com.ruoyi.memberSer.service.IMemberSerService;

/**
 * 服务号用户Service业务层处理
 *
 * @author ch
 * @date 2021-12-27
 */
@Service
public class MemberSerServiceImpl implements IMemberSerService
{
    @Autowired
    private MemberSerMapper memberSerMapper;

    /**
     * 查询服务号用户
     *
     * @param id 服务号用户主键
     * @return 服务号用户
     */
    @Override
    public MemberSer selectMemberSerById(Long id)
    {
        return memberSerMapper.selectMemberSerById(id);
    }

    /**
     * 查询服务号用户列表
     *
     * @param memberSer 服务号用户
     * @return 服务号用户
     */
    @Override
    public List<MemberSer> selectMemberSerList(MemberSer memberSer)
    {
        return memberSerMapper.selectMemberSerList(memberSer);
    }

    /**
     * 新增服务号用户
     *
     * @param memberSer 服务号用户
     * @return 结果
     */
    @Override
    public int insertMemberSer(MemberSer memberSer)
    {
        return memberSerMapper.insertMemberSer(memberSer);
    }

    /**
     * 修改服务号用户
     *
     * @param memberSer 服务号用户
     * @return 结果
     */
    @Override
    public int updateMemberSer(MemberSer memberSer)
    {
        return memberSerMapper.updateMemberSer(memberSer);
    }

    /**
     * 批量删除服务号用户
     *
     * @param ids 需要删除的服务号用户主键
     * @return 结果
     */
    @Override
    public int deleteMemberSerByIds(Long[] ids)
    {
        return memberSerMapper.deleteMemberSerByIds(ids);
    }


    /**
     * 批量逻辑删除服务号用户
     *
     * @param ids 需要删除的服务号用户主键
     * @return 结果
     */
    @Override
    public int logicDeleteMemberSer(Long[] ids,String delType,Long delUser)
    {
        return memberSerMapper.logicDeleteMemberSer(ids,delType,delUser);
    }

    /**
     * 删除服务号用户信息
     *
     * @param id 服务号用户主键
     * @return 结果
     */
    @Override
    public int deleteMemberSerById(Long id)
    {
        return memberSerMapper.deleteMemberSerById(id);
    }

    @Override
    public MemberSer selectMemberSerByUinonId(String unionId) {
        return memberSerMapper.selectMemberSerByUinonId(unionId);
    }
}
